/*
 * @(#)PlantModel.java        1.0 2000/05/09
 *
 * This file is part of Xfuzzy 3.0, a design environment for fuzzy logic
 * based systems.
 *
 * (c) 2000 IMSE-CNM. The authors may be contacted by the email address:
 *                    xfuzzy-team@imse.cnm.es
 *
 * Xfuzzy is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by
 * the Free Software Foundation.
 *
 * Xfuzzy is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
 * for more details.
 */

package xfuzzy;

/**
 * Modelo de una planta, es decir, un sistema externo sobre el que
 * interacciona el sistema difuso.
 * 
 * @author Francisco Jos� Moreno Velo
 *
 */
public interface PlantModel {

	/**
	 * Asigna a las variables de estado su valor por defecto
	 */
	public void init() throws Exception;

	/**
	 * Asigna a las variables de estado su valor inicial
	 */
	public void init(double[] state) throws Exception;

	/**
	 * Devuelve los valores de las variables de estado
	 */
	public double[] state();
	
	/**
	 * Devuelve la se�al de error para poder realizar ajustes basados
	 * en refuerzo.
	 * @return
	 */
	public double error();

	/**
	 * Ejecuta una acci�n de control y devuelve el nuevo estado
	 */
	public double[] compute(double[] x);
	
	/**
	 * Cierra el modelo
	 */
	public void close();
}   

